﻿// -------------------------------------------------------------------------
//    @FileName         :    NFEventDisp.cpp
//    @Author           :    gaoyi
//    @Date             :    24-8-13
//    @Email            :    445267987@qq.com
//    @Module           :    NFEventDisp
//
// -------------------------------------------------------------------------

#include <NFComm/NFPluginModule/NFCheck.h>

#include "NFEventDisp.h"
#include <NFGlobalMiscData.h>
#include <NFlogEventHandler.h>
#include <NFLoginNoticeData.h>
#include <NFPlayer.h>
#include <NFPlayerUtil.h>

int NFEventDisp::OnPlayerLogin(NFPlayer *pPlayer, bool iIsResume)
{
    NFlogEventHandler::OnPlayerLogin(pPlayer);
    NFPlayerUtil::OnPlayerLogin(pPlayer, iIsResume);

    NFLoginNoticeData::Instance()->OnPlayerLogin(pPlayer);
    return 0;
}

int NFEventDisp::OnPlayerLogout(NFPlayer *pPlayer)
{
    NFlogEventHandler::OnPlayerLogout(pPlayer);
    NFPlayerUtil::OnPlayerLogout(pPlayer);
    return 0;
}

int NFEventDisp::OnPlayerDisconnect(NFPlayer *pPlayer, int iType, int iReason)
{
    NFlogEventHandler::OnPlayerDisconnect(pPlayer, iType, iReason);
    NFPlayerUtil::OnPlayerDisconnect(pPlayer, iType, iReason);
    return 0;
}

int NFEventDisp::OnDestroyPlayer(NFPlayer *pPlayer)
{
    return 0;
}

int NFEventDisp::OnSessionLogCheckPoint(NFSession *pSession, int iCheckPoint)
{
    NFlogEventHandler::OnSessionLogCheckPoint(pSession, iCheckPoint);
    return 0;
}

int NFEventDisp::OnKickOff(NFPlayer *pPlayer, int iReason)
{
    return 0;
}

int NFEventDisp::OnPlayerDelete(NFSession *pSession, RoleOne *pstRoleOne)
{
    NFlogEventHandler::OnPlayerDelete(pSession, pstRoleOne);
    //CRoleRankUtil::OnRoleDelete( pstRoleOne );

    return 0;
}

int NFEventDisp::OnPlayerRestored(NFPlayer *pPlayer)
{
    NFPlayerUtil::OnPlayerRestore(pPlayer);
    NFlogEventHandler::OnPlayerRestored(pPlayer);

    NFLoginNoticeData::Instance()->OnPlayerLogin(pPlayer);
    return 0;
}

int NFEventDisp::OnPlayerRegister(NFPlayer *pPlayer)
{
    NFlogEventHandler::OnPlayerCreate(pPlayer);
    pPlayer->OnRegister();
    return 0;
}

int NFEventDisp::OnGetPlayerSuccess(NFPlayer *pPlayer)
{
    return 0;
}

int NFEventDisp::OnPlayerOnlineTime(NFPlayer* pPlayer, int timeElapse)
{
    return 0;
}

int NFEventDisp::OnItemChange(uint64_t uRoleID, uint32_t iItemID, int iQuality, uint64_t uuid, int64_t iAddNum, uint64_t iNewNum, int eReason, int iReasonParam, NFGridItem* obj)
{
    return 0;
}

int NFEventDisp::OnItemChange(NFPlayer* pPlayer, NFGridItem* item, int eReason, int iReasonParam)
{
    return 0;
}

int NFEventDisp::OnItemDiscard(uint64_t ullRoleID, uint32_t iItemID, uint64_t iNum, int eReason, int iReasonParam)
{
    return 0;
}

int NFEventDisp::OnItemTimeout(uint64_t ullRoleID, NFGridItem* pItem, bool bIsDress)
{
    return 0;
}

int NFEventDisp::OnAddExp(NFPlayer* pPlayer, uint64_t exp, uint32_t iOldLevel, uint64_t oldexp, int eReason, int iReasonParam)
{
    return 0;
}

int NFEventDisp::OnPlayerLevelUp(NFPlayer* pPlayer, int iLevelOld)
{
    return 0;
}

int NFEventDisp::OnQuestAccepted(NFPlayer* pPlayer, int iQuestID, const LoopQuest* pLoop)
{
    return 0;
}

int NFEventDisp::OnQuestGiveUp(NFPlayer* pPlayer, int iQuestID, uint32_t uAcceptTime)
{
    return 0;
}

int NFEventDisp::OnQuestDeleted(NFPlayer* pPlayer, int iQuestID, uint32_t uAcceptTime)
{
    return 0;
}

int NFEventDisp::OnQuestConditionReached(NFPlayer* pPlayer, int iQuestID)
{
    return 0;
}

int NFEventDisp::OnQuestComplete(NFPlayer* pPlayer, int iQuestID, uint32_t uAcceptTime, int iLoopQuestIndex, LoopQuest* pLoop)
{
    return 0;
}

int NFEventDisp::OnQuestSync(NFPlayer* pPlayer, int iQuestID, uint64_t iFromRoleID)
{
    return 0;
}

int NFEventDisp::OnLoopQuestAccepted(NFPlayer* pPlayer, const LoopQuest* pLoop)
{
    return 0;
}

int NFEventDisp::OnLoopQuestGiveUp(NFPlayer* pPlayer, const LoopQuest* pLoop, int iOldQuest, uint32_t uOldQuestAcceptTime)
{
    return 0;
}

int NFEventDisp::OnLoopQuestTimeOut(NFPlayer* pPlayer, const LoopQuest* pLoop, int iOldQuest, uint32_t uOldQuestAcceptTime)
{
    return 0;
}

int NFEventDisp::OnLoopQuestDeleted(NFPlayer* pPlayer, const LoopQuest* pLoop, int iOldQuest, uint32_t uOldQuestAcceptTime)
{
    return 0;
}

int NFEventDisp::OnLoopQuestSync(NFPlayer* pPlayer, const LoopQuest* pLoop, int iOldQuestID, uint32_t uOldQuestAcceptTime, uint64_t iFromRoleID)
{
    return 0;
}

int NFEventDisp::OnEnterArea(NFPlayer* pPlayer, int iMapId, int iAreaIdx)
{
    return 0;
}

int NFEventDisp::OnPlayerMove(NFPlayer* pPlayer, const proto_ff::RoleMapData* pRoleMapData)
{
    return 0;
}
